/* This source file is part of the Delectable Engine.
 * For the latest info, please visit http://delectable.googlecode.com/
 *
 * Copyright (c) 2009-2010 Ryan Chew
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *    http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * @file MouseEvents.h
 * @brief Mouse event defines.
 */

#ifndef __DBL_MOUSEEVENTS_H_
#define __DBL_MOUSEEVENTS_H_

// Chewable Headers //
#include <cbl/Chewable.h>
#include <cbl/Core/Event.h>

// Delectable Headers //
#include "dbl/Delectable.h"
#include "dbl/Input/MouseButtons.h"

namespace dbl
{
	namespace E
	{
		/*************************
		 *	[DEFINED EVENTS]
		 *	OnMouseMove
		 *	OnMouseDrag
		 *	OnMouseDown
		 *	OnMouseUp
		 *	OnMouseClick
		 *	OnMouseWheel
		 *************************/

		// Mouse move event.
		BEGIN_EVENT_DEF( OnMouseMove )
			/***** Event Arguments *****/
			cbl::Int32		X;
			cbl::Int32		Y;

			/***** Event Constructors *****/
			// OnMouseMove constructor.
			Constructor()
				: X( 0 ), Y( 0 ) {}
			// OnMouseMove constructor.
			Constructor( cbl::Int32 x, cbl::Int32 y )
				: X( x ), Y( y ) {}
		END_EVENT_DEF
			
		// Mouse drag event.
		BEGIN_EVENT_DEF( OnMouseDrag )
			/***** Event Arguments *****/
			Mouse::Button	Button;
			cbl::Int32		X;
			cbl::Int32		Y;

			/***** Event Constructors *****/
			// OnMouseDrag constructor.
			Constructor()
				: Button( Mouse::Button( 0 ) ), X( 0 ), Y( 0 ) {}
			// OnMouseDrag constructor.
			Constructor( Mouse::Button button, cbl::Int32 x, cbl::Int32 y )
				: Button( button ), X( x ), Y( y ) {}
		END_EVENT_DEF

		// Mouse down event.
		BEGIN_EVENT_DEF( OnMouseDown )
			/***** Event Arguments *****/
			Mouse::Button	Button;
			cbl::Int32		X;
			cbl::Int32		Y;

			/***** Event Constructors *****/
			// OnMouseDown constructor.
			Constructor()
				: Button( Mouse::Button( 0 ) ), X( 0 ), Y( 0 ) {}
			// OnMouseDown constructor.
			Constructor( Mouse::Button button, cbl::Int32 x, cbl::Int32 y )
				: Button( button ), X( x ), Y( y ) {}
		END_EVENT_DEF
		
		// Mouse up event.
		BEGIN_EVENT_DEF( OnMouseUp )
			/***** Event Arguments *****/
			Mouse::Button	Button;
			cbl::Int32		X;
			cbl::Int32		Y;

			/***** Event Constructors *****/
			// OnMouseUp constructor.
			Constructor()
				: Button( Mouse::Button( 0 ) ), X( 0 ), Y( 0 ) {}
			// OnMouseUp constructor.
			Constructor( Mouse::Button button, cbl::Int32 x, cbl::Int32 y )
				: Button( button ), X( x ), Y( y ) {}
		END_EVENT_DEF
			
		// Mouse click event.
		BEGIN_EVENT_DEF( OnMouseClick )
			/***** Event Arguments *****/
			Mouse::Button	Button;
			cbl::Int32		X;
			cbl::Int32		Y;

			/***** Event Constructors *****/
			// OnMouseClick constructor.
			Constructor()
				: Button( Mouse::Button( 0 ) ), X( 0 ), Y( 0 ) {}
			// OnMouseClick constructor.
			Constructor( Mouse::Button button, cbl::Int32 x, cbl::Int32 y )
				: Button( button ), X( x ), Y( y ) {}
		END_EVENT_DEF

		// Mouse wheel event.
		BEGIN_EVENT_DEF( OnMouseWheel )
			/***** Event Arguments *****/
			cbl::Int16		Delta;

			/***** Event Constructors *****/
			// OnMouseWheel constructor.
			Constructor( cbl::Int16 delta = 0 )
				: Delta( delta ) {}
		END_EVENT_DEF
	}
}

#endif // __DBL_MOUSEEVENTS_H_
